package cn.zlj.nmcc.service.iml;

import cn.zlj.nmcc.domain.CourseDoc;
import cn.zlj.nmcc.result.JSONResult;
import cn.zlj.nmcc.service.CourseEsService;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class CourseEsServicefallbackFactory implements FallbackFactory<CourseEsService> {
    @Override
    public CourseEsService create(Throwable throwable) {
        return new CourseEsService() {
            @Override
            public JSONResult saveEs(CourseDoc courseDoc) {
                return JSONResult.error("熔断了");
            }
        };
    }
}
